Problem: $f(x) = |-2x+4|$ Evaluate the definite integral. $\int^4_{-2}f(x)\,dx = $ Choose 1 answer: Choose 1 answer: (Choice A) A $8$ (Choice B) B $12$ (Choice C) C $16$ (Choice D) D $20$
Answer: Splitting up the absolute value Notice that the absolute value function is a piecewise function. Here we have that: $f(x) = \begin{cases} 2x-4 & \text{for} ~~~~x\geq2 \\ -2x+4 & \text{for} ~~~~ x \lt2\end{cases}$ Splitting up the definite integral Since we're working with a piecewise function, we need to split the definite integral up into two pieces: $\phantom{=} \int^4_{-2}f(x)\,dx$ $= \int^4_{2}f(x)\,dx + \int^2_{-2}f(x)\,dx~~~~~~$ [Why did we split at 2?] $= \int^4_{2}(2x - 4)\,dx + \int^2_{-2}(-2x+4)\,dx ~~~~~~$ Evaluating each piece Next, let's evaluate each of these definite integrals one at a time. The first definite integral: $\begin{aligned} \int^4_{2}(2x - 4)\,dx~ &=x^2 - 4x\Bigg|^4_{{2}} \\\\ &= \left[( 4)^2 -4\cdot(4) \right] - \left[({2})^2 - 4\cdot({2}) \right] \\\\ &= \left[0\right] -\left[-4 \right] \\\\ &= {4}\end{aligned}$ The second definite integral: $\begin{aligned} \int^2_{-2}(-2x+4)\,dx~ &=-x^2+4x\Bigg|^2_{{-2}} \\\\ &= \left[-( 2)^2 +4\cdot({2})\right] - \left[-( {-2})^2+4({-2}) \right] \\\\ &= \left[4\right] -\left[-12 \right] \\\\ &= {16}\end{aligned}$ Putting the pieces together Now let's add these two pieces together to find the answer: $\phantom{=} \int^4_{2}(2x - 4)\,dx + \int^2_{-2}(-2x+4)\,dx$ $ = {4} + {16}$ $ = 20$ The answer $\int^4_{-2}f(x)\,dx = 20$